package com.chenliang.remote.biz;


import com.chenliang.remote.po.User;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: long_invoke
 * @description:
 * @author: liangchen23
 * @create: 2022-03-15 16:41
 */
@RestController
@RequestMapping("/user")
public class UserBiz {


    @PostMapping("/get1")
    public User getUser1(String id) {
        return User.builder().id(id).name("陈亮").build();
    }

    @PostMapping("/get2")
    public User getUser2(User user) {
        return User.builder().id(user.getId()).name(user.getName()).build();
    }

    @PostMapping("/get3")
    public User getUser3(@RequestBody User user) {
        return User.builder().id(user.getId()).name(user.getName()).build();
    }
}
